import request from "../../utils/request";
import { LoginForm, RegisterForm } from './type'
import API from "../api";


// 注册

export const postRegister = (data: RegisterForm) => request.post<any, any>(API.REGISTER, data)

// 短信验证码
export const getCode = (mobile: string, type: string) => request.get<any, any>(API.CODE + `?mobile=${mobile}&type=${type}`)


// 登录
// 账号：12000000001，密码：456itheima.CN032@.当天日期
export const postLogin = (data: LoginForm) => request.post<any, any>(API.LOGIN, data)